package com.cavy.platform.server;

import lombok.Data;
import org.springframework.validation.ObjectError;

import java.util.ArrayList;
import java.util.List;

/**
 * 自定义异常
 * 用于抛出参数绑定失败
 */
@Data
public class BindingErrorException extends RuntimeException {
    private List<ObjectError> errorList = new ArrayList<>();

    public BindingErrorException(List<ObjectError> allErrors) {
        this.errorList = allErrors;
    }
}
